package com.shanjupay.transaction.config;

import org.springframework.stereotype.Component;
import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * @className: WebMvcConfig
 * @Description: TODO
 * @author: Huangjianyun
 * @date: 2021/10/23 23:23
 */
@Component
public class WebMvcConfig  implements WebMvcConfigurer {
    /*
    * 接口路径/pay-page映射到具体的freemarker视图中pay.html
    *
    * */
    @Override
    public void addViewControllers(ViewControllerRegistry registry) {
        registry.addViewController("/pay-page").setViewName("pay");
        registry.addViewController("/pay-page-error").setViewName("pay_error");
    }
}
